package ore.example.pokemoninfo.command;

import ore.example.pokemoninfo.GUI.PokemonUnlockGUI;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class UnlockCommand implements CommandExecutor {
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("§c只有玩家才能使用这个命令！");
            return true;
        }

        // 打开 GUI
        new PokemonUnlockGUI(player);
        return true;
    }
}
